# -*- coding: utf-8 -*-


import wx

class StatusbarCtrl(wx.StatusBar):
	def __init__(self, parent):
		wx.StatusBar.__init__(self, parent, -1)
		
		# This status bar has three fields
		self.SetFieldsCount(2)
		# Sets the three fields to be relative widths to each other.
		self.SetStatusWidths([-1, 100])
		
		# Field 0 ... just text
		self.SetStatusText("A Custom StatusBar...", 0)
	
	def setText(self, text):
		if type(text)==str or type(text)==unicode:
			self.SetStatusText(text, 0)
		
	def setCoding(self, coding):
		if type(coding)==str or type(coding)==unicode:
			self.SetStatusText(coding, 1)
